<template>
  <div class="header">
    <div class="header-left" @click.stop="hiddenNormalPlayer"></div>
    <div class="header-title">
      <h3>{{ this.currentSong.name }}</h3>
      <p>{{ this.currentSong.singer }}</p>
    </div>
    <div class="header-right"></div>
  </div>
</template>

<script>
import {mapActions, mapGetters} from "vuex"

export default {
  name: "PlayerHeader",
  data() {
    return {}
  },
  methods: {
    ...mapActions([
      'setFullScreen',
      'setMiniPlayer'
    ]),
    hiddenNormalPlayer() {
      this.setFullScreen(false);
      this.setMiniPlayer(true);
    }
  },
  computed: {
    ...mapGetters([
      'currentSong'
    ])
  }
}
</script>

<style scoped lang="scss">
@import "../../assets/css/variable";
@import "../../assets/css/mixin";

.header {
  width: 100%;
  height: 100px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 999;

  .header-left, .header-right {
    width: 84px;
    height: 84px;
  }

  .header-left {
    @include bg_img("../../assets/images/down")
  }

  .header-title {
    color: white;
    text-align: center;
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    @include font_size($font_large);
    @include no-wrap();

  }
}
</style>
